<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<%@ include file="../../common/taglibs.jsp"%>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<link rel="StyleSheet" type="text/css" href="<%=request.getContextPath()%>/pages/css/common.css"></link>
		<link rel="StyleSheet" type="text/css" href="<%=request.getContextPath()%>/pages/css/password.css"></link>
		<script type="text/javascript" src="<%=request.getContextPath()%>/pages/js/password.js" ></script>
		<script type="text/javascript" src="<%=request.getContextPath()%>/pages/js/jquery-1.5.js" ></script>
		<script type="text/javascript" src="<%=request.getContextPath()%>/pages/js/jquery.validate.min.js" ></script>
		<script type="text/javascript">
		function checkUsernameAvailablity(){
			var userName = jQuery("#username").val();
			jQuery.ajax({
				  url: "<%=request.getContextPath()%>/admin/ajaxCheckUsernameAvailablity?userNameToCheck=" + userName,
				  success: function(data){
					  var obj = jQuery.parseJSON(data);
					  if(obj.success){
						  jQuery("#divAvailablity").css("color", "green");
					  }else{
						  jQuery("#divAvailablity").css("color", "red");
					  }
					  jQuery("#divAvailablity").html(obj.message);
					  jQuery("#divAvailablity").css("display", "block");
				  }
			});
		}
		</script>
		<title>DFASS</title>
	</head>
<body>
	<div class="headerContent" align="center">
		<div class="header">
		<%@ include file="../../inc/logged_top.jsp" %>			
		</div>
		<div id="nav_container">
		<%@ include file="../../menu/menu_admin.jsp" %>
	    </div>
	</div>
	<!-- body -->
	<div class="bodyContent" align="center">
		<table><tr><td>&nbsp;</td></tr></table>
		<!-- This Empty Table is Required before the content of the body -->
		<s:form theme="simple" id="submitEditUser" name="submitEditUser" action="submitEditUser">		
			<table class="tblAdminNormal" width="600px;">
				<thead>
					<tr>
						<td colspan="2">User Registration</td>
					</tr>
				</thead>
				<tbody>
					<tr>
			    	<td>Username</td>
			      <td>
	          	<s:textfield name="username" id="username" cssStyle="width:250px" value="%{loginUser.username}" readonly="true"/>
						</td>
			    </tr>
			    <tr>
		        <td>Password recovery code</td>
		        <td><s:textfield name="code" style="width:250px;" value="%{loginUser.code}" readonly="true"/></td>
			    </tr>
			    <tr>
		        <td width="150px;">First Name</td>
		        <td>
		        		<s:textfield name="fName" cssStyle="width:250px" id="fName"  value="%{loginUser.fName}" readonly="true"/>
		        </td>
			    </tr>
			    <tr>
		        <td>Last Name</td>
		        <td><s:textfield name="lName" cssStyle="width:250px"  value="%{loginUser.lName}"  readonly="true"/></td>
			    </tr>
			    <tr>
		        <td valign="top">Address</td>
		        <td><s:textarea name="address" cssStyle="resize:none;width:250px; height:50px;" value="%{loginUser.address}"  readonly="true"/></td>
			    </tr>
			    <tr>
		        <td>Contact No</td>
		        <td><s:textfield name="contactNo" cssStyle="width:250px" value="%{loginUser.contactNo}"  readonly="true"/></td>
			    </tr>
			    <tr>
		        <td>Mobile No</td>
		        <td><s:textfield name="mobileNo" cssStyle="width:250px" value="%{loginUser.mobileNo}"  readonly="true"/></td>
			    </tr>
			    <tr>
		        <td>E-mail</td>
		        <td><s:textfield name="email" cssStyle="width:250px" value="%{loginUser.email}"  readonly="true"/></td>
			    </tr>
				</tbody>
			</table>		
		</s:form>
	</div>				
	
	<div class="footerContent" align="center">
		<div class="footer">
			<%@ include file="/pages/inc/footer.jsp" %>
		</div>
	</div>
</body>
</html>